package com.zhangfb95.crosschain.plugin.container.java.fabric2.infra.data.api.crosschainserver;

import com.zhangfb95.crosschain.infra.model.Result;
import com.zhangfb95.crosschain.protocol.exc.request.SendExcReq;
import com.zhangfb95.crosschain.protocol.exc.response.SendExcRes;
import com.zhangfb95.crosschain.protocol.routerplugincontroller.request.GetAccountPluginReq;
import com.zhangfb95.crosschain.protocol.routerplugincontroller.request.SignPluginReq;
import com.zhangfb95.crosschain.protocol.routerplugincontroller.response.GetAccountPluginRes;
import com.zhangfb95.crosschain.protocol.routerplugincontroller.response.SignPluginRes;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;

/**
 * @author zhangfubing
 * @since 2023/11/4
 */
@HttpExchange("/plugin")
public interface PluginApi {

    @PostExchange("/getAccount")
    Result<GetAccountPluginRes> getAccount(@RequestBody GetAccountPluginReq req);

    @PostExchange("/sign")
    Result<SignPluginRes> sign(@RequestBody SignPluginReq req);

    @PostExchange("/send")
    Result<SendExcRes> send(@RequestBody SendExcReq req);
}
